﻿using System.Collections.Generic;
using ControleRepresentanteSync.Logic.Models;

namespace ControleRepresentanteSync.Application.SimpleSync
{
    abstract class SearchableContentPresenter<TViewModel, TModel, TItem, TContract> : SimpleSyncContentPresenter<TViewModel, TModel, TItem, TContract>
        where TViewModel : ISearchableContentViewModel<TModel, TItem, TContract>
        where TItem : ISimpleSycItem<TContract> 
        where TContract : class
        where TModel : Searchable
    {
        protected SearchableContentPresenter(TViewModel viewModel, TModel model, IEnumerable<TItem> items)
            : base(viewModel, model, items)
        {
            ViewModel.RazaoSocial = model.RazaoSocial;
            ViewModel.NomeFantasia = model.NomeFantasia;
            ViewModel.Cidade = model.Cidade;
            ViewModel.Bairro = model.Bairro;
        }
    }
}